<!DOCTYPE html>
<html>
<head>
    <title>用户代理升级记录</title>
		<#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
            <div style="overflow-x:auto">
                <table style="border-collapse:separate; border-spacing: 10px;">
                    <tr>
                        <td class="col-sm-3">
                            <span class="col-sm-2 control-label">用户ID</span>
                            <input type="text" name="qInput" class="form-control col-sm-10" v-model="q.userId"
                                   @keyup.enter="query" placeholder="用户ID">
                        </td>
                        <td class="col-sm-3">
                            <span class="col-sm-2 control-label">手机号</span>
                            <input type="text" name="qInput" class="form-control col-sm-10" v-model="q.mobile"
                                   @keyup.enter="query" placeholder="手机号:支持模糊查询">
                        </td>
                        <td class="col-sm-3">
                            <span class="col-sm-2 control-label" >创建时间</span>
                            <input type="text" name="qInput" readonly="true"  style="width:31%" class="form-control col-sm-4" id="createTime" @keyup.enter="query" placeholder="开始时间">
                            <label class="col-sm-1 control-label">—</label>
                            <input type="text" name="qInput"  readonly="true"  style="width:31%"  class="form-control col-sm-3" id="createTime1" @keyup.enter="query" placeholder="结束时间">
                        </td>
                        <td class="col-sm-3">
                            <a class="btn btn-default" @click="query">查询</a>
                            <a class="btn btn-default" @click="reset">重置</a>
<!--                            <a class="btn btn-default" @click="exportExcel">导出</a>-->
                        </td>
                    </tr>

                </table>

            </div>
			<#if shiro.hasPermission("sys:useupgradelog:save")>
            <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
			</#if>
			<#if shiro.hasPermission("sys:useupgradelog:update")>
            <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			</#if>
			<#if shiro.hasPermission("sys:useupgradelog:delete")>
            <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
			</#if>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
               <div class="form-group">
                    <div class="col-sm-2 control-label">用户ID</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" v-model="useupgradeLog.userId" placeholder="用户ID"/>
                    </div>
                </div>
               <div class="form-group">
                    <div class="col-sm-2 control-label">手机号</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" v-model="useupgradeLog.mobile" placeholder="手机号"/>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">类型</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" v-model="useupgradeLog.type" placeholder="类型： 1， 推荐晋升， 2 ，累计金额晋升"/>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">当前等级</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" v-model="useupgradeLog.level" placeholder="当前等级"/>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">当前等级名称</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" v-model="useupgradeLog.levelName" placeholder="当前等级名称"/>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">升级后的等级</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" v-model="useupgradeLog.upgradeLevel" placeholder="升级后的等级"/>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">升级后的等级名称</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" v-model="useupgradeLog.upgradeLevelName" placeholder="升级后的等级名称"/>
                    </div>
                </div>
               <div class="form-group">
                    <div class="col-sm-2 control-label">类型为1时，推荐数量</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" v-model="useupgradeLog.recommendNum" placeholder="类型为1时，推荐数量"/>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">类型为2时，累计业绩</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" v-model="useupgradeLog.performance" placeholder="类型为2时，累计业绩"/>
                    </div>
                </div>
<!--                <div class="form-group">-->
<!--                    <div class="col-sm-2 control-label">类型为2时，推荐同级别累计进货金额</div>-->
<!--                    <div class="col-sm-10">-->
<!--                        <input type="text" class="form-control" v-model="useupgradeLog.recommendPerformance" placeholder="类型为2时，推荐同级别累计进货金额"/>-->
<!--                    </div>-->
<!--                </div>-->
                <div class="form-group">
                    <div class="col-sm-2 control-label">状态</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" v-model="useupgradeLog.status" placeholder="状态： 0，待审核，1 审核通过， 2 审核拒绝"/>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label"></div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" v-model="useupgradeLog.createTime" placeholder=""/>
                    </div>
                </div>
               <div class="form-group">
                    <div class="col-sm-2 control-label"></div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" v-model="useupgradeLog.updateTime" placeholder=""/>
                    </div>
                </div>
            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" id="btnSaveOrUpdate" data-loading-text="保存中..." @click="saveOrUpdate" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>
    <div class="modal fade" id="myModal" >
        <div class="modal-dialog" role="document"  style="width: 500px;">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="myModalLabel">上级详情</h4>
                    <input type="hidden" id="recordId">
                </div>
                <div class="modal-body">
                    <div class="form-group">
                        <label>用户ID:   </label>
                        <label id="userId" ></label>
                    </div>
                    <div class="form-group">
                        <label>姓名:   </label>
                        <label id="userName" ></label>
                    </div>
                    <div class="form-group">
                        <label>手机号:   </label>
                        <label id="mobile" ></label>
                    </div>
                    <div class="form-group">
                        <label>类型:   </label>
                        <label id="type" ></label>
                    </div>
                    <div class="form-group">
                        <label>当前等级:   </label>
                        <label id="levelName" ></label>
                    </div>
                    <div class="form-group">
                        <label>升级后等级:   </label>
                        <label id="upgradeLevelName" ></label>
                    </div>
                    <div class="form-group">
                        <label>推荐数量:   </label>
                        <label id="recommendNum" ></label>
                    </div>
                    <div class="form-group">
                        <label>累积业绩:   </label>
                        <label id="performance" ></label>
                    </div>
<!--                    <div class="form-group">-->
<!--                        <label>推荐同级累计进货金额:   </label>-->
<!--                        <label id="recommendPerformance" ></label>-->
<!--                    </div>-->
<!--                    <div class="form-group" id="failCauseDiv">-->
<!--                        <label>审核失败原因:   </label>-->
<!--                        <label id="remark" style="color: red"></label>-->
<!--                    </div>-->
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-primary" id="btn_ok" onclick="updateOut(1);" data-dismiss="modal"><span class="glyphicon glyphicon-ok" aria-hidden="true"></span>&nbsp;审核通过</button>

                    <button class="btn btn-primary"type="button"  onclick="updateOut(2);" id="btn_no" class="btn btn-primary" data-dismiss="modal"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span>&nbsp;审核不通过</button>
                    <button class="btn btn-primary"type="button" id="btn_remove" class="btn btn-primary" data-dismiss="modal"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span>&nbsp;关闭</button>
                </div>
            </div>
        </div>
    </div>

    <div class="modal fade" id="failCauseModal" >
        <div class="modal-dialog" role="document"  style="width: 400px;height: 400px;">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                </div>
                <div class="modal-body">
                    <div class="form-group" style="text-align:center;">
                        <h4 class="modal-title">请说明审核失败原因：</h4>
                        <textarea id="remark1"  type="text" style="width: 300px;height: 70px;"></textarea>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-primary" onclick="savefailCause(2);" data-dismiss="modal"><span class="glyphicon glyphicon-ok" aria-hidden="true"></span>&nbsp;提交</button>
                </div>
            </div>
        </div>
    </div>
</div>

<script src="${request.contextPath}/statics/js/modules/sys/userUpgradelog.js?_${.now?long}"></script>
</body>
</html>